<?php
/**
 * @user:andy
 * @date:2021/7/12
 * @company:http://www.sjdphp.com
 * @desc:
 */

namespace app\admin\validate;


use think\Validate;

class MemberPrivilegeValidate extends Validate
{
    protected $rule = [
        'privilege_id'   => 'require|number',
        'privilege_name' => 'require',
        'privilege_img'  => 'require',
    ];

    protected $message = [
        'privilege_id.require' => '参数不能为空',
        'privilege_id.number'  => '参数不合法',
        'privilege_name.require' => '特权名称不能为空',
        'privilege_img.require'  => '特权图标不能为空',
    ];

    protected $scene = [
        'add'  => ['privilege_name','privilege_img'],
        'edit' => ['privilege_name','privilege_img','privilege_id'],
    ];
}